home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sprite 1984 - 1993
/
Sprite 1984 - 1993.iso
/
man
/
cmds.fmt
/
zwgc.man
< prev
next >
Wrap
Text File
|
1992-11-23
|
41KB
|
1,123 lines
ZWGC User Commands ZWGC
NNAAMMEE
zwgc - Zephyr Windowgram Client program
SSYYNNOOPPSSIISS
zzwwggcc [ -reenter ] [ -nofork ] [ -ttymode ] [ -f _f_i_l_e_n_a_m_e ] [
-subfile _f_i_l_e_n_a_m_e ] [ -default _p_o_r_t_n_a_m_e ] [ -disable _p_o_r_t_-
_n_a_m_e ] ... [ output driver options ] [ X Toolkit options...
]
DDEESSCCRRIIPPTTIIOONN
_Z_w_g_c is the main _z_e_p_h_y_r(_1) client. It is responsible for
receiving selected zephyr notices on behalf of the user,
formatting them, and displaying them using one or more of
the output devices.
SSeelleeccttiioonn ooff ZZeepphhyyrr NNoottiicceess
_Z_w_g_c subscribes to various notice classes and instances on
behalf of the user. Only notices in the subscription list
will be received. The subscription list is composed of the
default subscriptions (stored on the server), the user's
subscriptions file, and any subscriptions made using
_z_c_t_l(1). The user's subscription file defaults to
$_H_O_M_E/._z_e_p_h_y_r._s_u_b_s, or it can be specified with the -subfile
option. If "-" is specified as the subscription filename,
the subscriptions will be read from standard input.
The _z_c_t_l command is used to manipulate and change subscrip-
tions. See the _z_c_t_l(1) man page for details.
ZZeepphhyyrr DDeessccrriippttiioonn FFiilleess
_Z_w_g_c formats its output messages according to the commands
in its description file. The user's description file
($_H_O_M_E/._z_w_g_c._d_e_s_c by default, or whatever is specified by
-f) is read, or the system file is read if the user's does
not exist.
Every time a notice is received, _z_w_g_c runs through the
description file, and executes the appropriate commands.
ZZeepphhyyrr DDeessccrriippttiioonn FFiillee SSyynnttaaxx
A description file is simply a list of commands. Whitespace
(spaces, tabs, and line breaks) is used to separate tokens.
The type and amount of whitespace separating tokens is
irrelevant. Comments can be delimited by # and newline (for
line-oriented comments, e.g. "# this is a comment" on a line
MIT Project Athena November 30, 1989 1
ZWGC User Commands ZWGC
by itself) or by /* and */ (e.g. "/* this is a comment */").
DDEESSCCRRIIPPTTIIOONN LLAANNGGUUAAGGEE
EExxpprreessssiioonnss
Expressions are used by certain commands. They are composed
from string literals, variable references, function calls,
and operators. Parentheses can be used anywhere in an
expression to group expressions or increase readability.
String literals are specified by putting the contents in
"double quotes".
Variables are set using the sseett command (see "COMMANDS",
below). They are referenced in an expression by using the
form $_v_a_r_n_a_m_e. Some variables are set by default for each
notice. All other variables retain their values between
notice interpretations, so that if you set a variable, it
retains that value until later modified.
Functions are called using a C-like syntax,
ffnnaammee(_e_x_p_r_1,_e_x_p_r_2), where ffnnaammee is the function name and
_e_x_p_rnn are the arguments.
Binary operators use infix notation, such as "a == b".
Some commands use an expression list (exprlist), which is
simply a set of expressions separated by whitespace (e.g.
$var1 "lit1" $var2).
DDeeffaauulltt vvaarriiaabblleess
The following variables are always available:
11,, ......
Numeric variables are assigned values corresponding to
that field in the notice (the body of each notice is
conceptually an array of fields, each terminated with a
null character). If the number is greater than the
number of fields actually in the notice, the value is
"". For example, the standard zwrite messages have two
fields: $1 is the signature, and $2 is the text of the
message.
aauutthh An indication of the authenticity of the notice.
``yes'' means the notice is authentic, ``no'' means it
is not, and ``forged'' means that the message claimed
to be authentic but the verification of the claim
failed. The ``forged'' indication usually appears when
a user has changed his Kerberos tickets with _k_i_n_i_t(1)
but has not run ``zctl sub'' to register this change
MIT Project Athena November 30, 1989 2
ZWGC User Commands ZWGC
with the Zephyr servers.
ccllaassss
The class of the current notice.
ddaattee The date on which the notice was sent.
ddeeffaauulltt
The default output format for the current notice
eerrrroorr
An error message from the port read/write commands.
ffrroommhhoosstt
The full name of the host from which the notice appears
to have been sent. _T_h_i_s _i_s _n_o_t _f_u_l_l_y _r_e_l_i_a_b_l_e, as the
information used to determine this hostname is not
guaranteed to be correct (even for authentic messages).
ffuullllsseennddeerr
The notice sender's name, including the zephyr realm
name.
iinnssttaannccee
The instance of the current notice.
kkiinndd The kind of notice.
mmeessssaaggee
The full text of the message, with nulls converted to
newlines.
nnuummbbeerr__ooff__ffiieellddss
The number of fields in the message (a string represen-
tation of a decimal number).
ooppccooddee
The opcode of the current notice.
oouuttppuutt__ddrriivveerr
The name of the output driver in use.
ppoorrtt The port from which the notice was sent.
rreeaallmm
The local zephyr realm.
rreecciippiieenntt
The recipient for the current notice. If the notice is
a multicast (sent to several people), the recipient is
set to ``*''.
MIT Project Athena November 30, 1989 3
ZWGC User Commands ZWGC
sseennddeerr
Usually a shortened version of fullsender. If the
realm of the sender is equal to the realm of the reci-
pient, _s_e_n_d_e_r omits the realm name.
ttiimmee The time of day at which the notice was sent.
uusseerr The full zephyr name of the user (e.g.
marc@ATHENA.MIT.EDU).
vveerrssiioonn
The current version of _z_w_g_c.
zzeepphhyyrr__vveerrssiioonn
The protocol version of the notice.
All of these variables (except for error, output_driver, and
version) are re-set before each notice is processed.
FFuunnccttiioonnss
Following is a list of functions available for use in the
description file.
bbuuffffeerr()
The contents of the current output buffer.
ddoowwnnccaassee(_e_x_p_r)
Returns the value of _e_x_p_r, converted to lower case.
ggeett(_e_x_p_r)
Returns a line from the port named _e_x_p_r. If there is
no text waiting on the port (e.g. the program connected
to the port has not printed any output), this function
will wait until it can read a line of text from the
port.
ggeetteennvv(_e_x_p_r)
Returns the value of the environment variable _e_x_p_r, or
the empty string if it does not exist.
llaannyy(_e_x_p_r_1, _e_x_p_r_2), rraannyy(_e_x_p_r_1, _e_x_p_r_2)
Return a number of characters equal to the length of
_e_x_p_r_2 from the beginning (llaannyy) or end (rraannyy) of _e_x_p_r_1
(e.g. lany("1234567890","foo") would return "123"). If
_e_x_p_r_1 is a variable reference, the variable is modified
to remove the characters returned. If _e_x_p_r_2 is longer
than _e_x_p_r_1, the value of _e_x_p_r_1 is returned (and _e_x_p_r_1
is set to "", if a variable).
MIT Project Athena November 30, 1989 4
ZWGC User Commands ZWGC
llbbrreeaakk(_e_x_p_r_1, _e_x_p_r_2), rrbbrreeaakk(_e_x_p_r_1, _e_x_p_r_2)
_E_x_p_r_2 defines a set of characters. The function
returns the longest initial (llbbrreeaakk) or final (rrbbrreeaakk)
string from _e_x_p_r_1 composed of characters _n_o_t in this
set (e.g. lbreak("characters", "tuv") would return
"charac"). If _e_x_p_r_1 is a variable reference, the vari-
able is modified to remove the characters returned. If
no characters in _e_x_p_r_2 are in _e_x_p_r_1, then _e_x_p_r_1 is
returned (and _e_x_p_r_1 is set to "", if a variable).
llssppaann(_e_x_p_r_1, _e_x_p_r_2), rrssppaann(_e_x_p_r_1, _e_x_p_r_2)
These functions are the negation of the bbrreeaakk func-
tions; the returned string consists of characters _i_n
the set defined by _e_x_p_r_2
pprrootteecctt(_e_x_p_r)
Returns a string which will be evaluated identically to
_e_x_p_r, but will not affect any surrounding environments.
That is, any characters which could close outside
environments are quoted, and any environments in _e_x_p_r
which are not closed at the end are closed.
ssuubbssttiittuuttee(_e_x_p_r)
Evaluates variable references of the form $_v_a_r_i_a_b_l_e in
expr and converts $$ to $.
uuppccaassee(_e_x_p_r)
Returns the value of _e_x_p_r, converted to upper case.
vveerrbbaattiimm(_e_x_p_r)
Returns a string that will be displayed exactly as _e_x_p_r
looks. Anything which could be mistaken for an
environment is quoted.
zzvvaarr(_e_x_p_r)
Returns the value of the zephyr variable _e_x_p_r, or the
empty string if it does not exist. [Zephyr variables
can be set and examined with _z_c_t_l(1).]
OOppeerraattoorrss
Following is a list of operators which can be used in the
description file to compose expressions:
_e_x_p_r_1 ++ _e_x_p_r_2
String concatenation of _e_x_p_r_1 and _e_x_p_r_2
_e_x_p_r_1 ==== _e_x_p_r_2
True if the two expressions are equal, false otherwise.
_e_x_p_r ==~~ _e_x_p_r_2
MIT Project Athena November 30, 1989 5
ZWGC User Commands ZWGC
True if the regular expression pattern _e_x_p_r_2 matches
_e_x_p_r_1.
_e_x_p_r_1 !!~~ _e_x_p_r_2
Negation of "=~".
_e_x_p_r_1 !!== _e_x_p_r_2
Negation of "=="
_e_x_p_r_1 aanndd _e_x_p_r_2, _e_x_p_r_1 && _e_x_p_r_2
True if _e_x_p_r_1 and _e_x_p_r_2 are both true.
_e_x_p_r_1 oorr _e_x_p_r_2, _e_x_p_r_1 || _e_x_p_r_2
True if either of _e_x_p_r_1 or _e_x_p_r_2 are true.
!! _e_x_p_r_1, nnoott _e_x_p_r_1
The logical negation of _e_x_p_r_1.
CCoommmmaannddss
Following is a list of the commands usable in the descrip-
tion language:
aappppeennddppoorrtt _e_x_p_r_1 _e_x_p_r_2
Creates a port called _e_x_p_r_1. All output to the port
will be appended to the file _e_x_p_r_2. There is no input.
If the file is created, its mode is set to read-write,
owner only (no access for others).
bbrreeaakk
Exits the innermost if, case, or while block.
ccaassee _e_x_p_r_1 [ ((mmaattcchh _e_x_p_r [,_e_x_p_r ...]) | ddeeffaauulltt) _c_o_m_m_a_n_d_s ] ... eennddccaassee
Evaluates _e_x_p_r_1. Then, each of the match expressions
is evaluated in order. The first time an expression
matches _e_x_p_r_1, then the body of commands under it is
executed, and the rest of the case statement is
skipped. This compare is case-insensitive. default
always matches, so it should always appear as the last
set of commands. See the default description file for
an example of use.
cclleeaarrbbuuff
Clears the output buffer (see below for details on
buffering).
cclloosseeiinnppuutt _e_x_p_r
Closes the file associated with _e_x_p_r.
cclloosseeoouuttppuutt _e_x_p_r
Sends an EOF (end-of-file) to the process if _e_x_p_r was a
MIT Project Athena November 30, 1989 6
ZWGC User Commands ZWGC
port created by execport, or closes the file if it was
created by outputport or appendport.
cclloosseeppoorrtt _e_x_p_r
Closes both input and output of _e_x_p_r as defined above.
ffiieellddss _v_a_r_i_a_b_l_e_1 ...
sets the list of variables to be equal to the fields in
the notice. If there are more variables than fields,
the extra variables are left empty.
eexxeecc _e_x_p_r_l_i_s_t
Executes a program without any input or output. A com-
mand named by _e_x_p_r_l_i_s_t is executed. Each expression is
used as an argument to the program; the first expres-
sion names the program (it may be either an absolute
pathname, or a program name; the user's PATH is
searched to find simple program names).
eexxeeccppoorrtt _e_x_p_r_1 _e_x_p_r_l_i_s_t
Creates a port called _e_x_p_r_1. A command named by
_e_x_p_r_l_i_s_t is executed, as described above for eexxeecc. All
output to the port is sent to the standard input of the
process. Reading from the port will return the stan-
dard output of the process.
eexxiitt Completes processing of the current notice. The
remainder of the description file is ignored after exe-
cution of this command.
iiff _e_x_p_r_1 tthheenn _c_o_m_m_a_n_d_s_1 [eellsseeiiff _e_x_p_r_2 tthheenn _c_o_m_m_a_n_d_s_2] ... [eellssee _c_o_m_m_a_n_d_s_n] eennddiiff
If _e_x_p_r_1 evaluates to true, execute _c_o_m_m_a_n_d_s_1, _e_t_c. [_A
_c_o_n_d_i_t_i_o_n_a_l _c_o_n_s_t_r_u_c_t, _s_i_m_i_l_a_r _t_o _t_h_e _c_o_n_s_t_r_u_c_t_s _i_n _t_h_e
_C _s_h_e_l_l (_c_s_h).]
iinnppuuttppoorrtt _e_x_p_r_1 _e_x_p_r_2
Creates a port called _e_x_p_r_1. All input from the port
comes from the file _e_x_p_r_2. There is no output.
nnoooopp does nothing
oouuttppuuttppoorrtt _e_x_p_r_1 _e_x_p_r_2
Creates a port called _e_x_p_r_1. The file _e_x_p_r_2 will be
truncated, or created if it does not exist. All output
to the port will be appended to the file _e_x_p_r_2. There
is no input. If the file is created, its mode is set
to read-write, owner only (no access for others).
pprriinntt _e_x_p_r_1 ...
adds the values of the expressions to the current out-
put buffer. The values of the expressions are
separated by spaces in the output.
MIT Project Athena November 30, 1989 7
ZWGC User Commands ZWGC
ppuutt [_e_x_p_r [_e_x_p_r_l_i_s_t]]
Sends data to a port. If _e_x_p_r is provided, then it is
used as the port, otherwise the port used is the port
corresponding to the default output device. If
_e_x_p_r_l_i_s_t is provided, the expressions in the list are
sent to the port, separated by spaces. If it is omit-
ted, then the contents of the output buffer are sent as
the data.
sseett _v_a_r_i_a_b_l_e == _e_x_p_r
sets _v_a_r_i_a_b_l_e equal to _e_x_p_r. Variable can later be
referenced by $_v_a_r_i_a_b_l_e.
sshhooww _t_e_x_t eennddsshhooww
Appends text to the output buffer. This command is
special, because the string does not need to be quoted.
Whitespace at the beginning or end of the lines of text
is ignored. The _e_n_d_s_h_o_w must appear as the first token
on a line (it may only be preceded on that line by whi-
tespace). Variable substitutions and formatting com-
mands (but not expressions or functions) are processed
in the text. Example:
show
this is some text
from: $sender
endshow
wwhhiillee _e_x_p_r ddoo _s_t_a_t_e_m_e_n_t_s eennddwwhhiillee
Executes _s_t_a_t_e_m_e_n_t_s until _e_x_p_r is false.
PPOORRTTSS
Ports are an abstraction encompassing all I/O forms of which
zwgc is capable. There are pre-existing output ports
corresponding to each of the output devices, and more ports
can be created with the port commands described above.
OOUUTTPPUUTT
The output is usually collected in the _o_u_t_p_u_t _b_u_f_f_e_r and
saved until a _p_u_t command sends the output to an output dev-
ice (such as an X display or a terminal). The output buffer
is implicitly cleared after each notice is completely pro-
cessed.
Output devices are implemented as output ports. A message
is displayed in a device-dependent manner when a string is
output to the port corresponding to the output device. For-
matting commands are embedded in the text as @ commands of
the form @command(text). Command names are case-insensitive
and consist of alphanumeric characters and underscores.
MIT Project Athena November 30, 1989 8
ZWGC User Commands ZWGC
Valid brackets are () [] {} and <>. If the command name is
empty (such as in ``@@((ffoooo))''), then a new environment with
no changes is created (This is useful to temporarily change
some parameter of the output, such as the font).
The following output devices are supported:
stdout
Sends the string to standard output exactly as is.
stderr
Sends the string to standard error exactly as is.
plain
Sends the string with all formatting environments
removed to standard output.
tty Does formatting on the message according to @ commands
embedded in the text. The output, with appropriate
mode-changing sequences, is sent to the standard out-
put. The appropriate characteristics of the display
are taken from the TERMCAP entry (see _t_e_r_m_c_a_p(5)) for
the terminal named by the TERM environment variable.
Supported @ commands are:
@roman Roman (plain) letters (turns off
all special modes).
@b or @bold Bold letters. If not available,
reverse video, else underline.
@i or @italic Italic letters (underlining, if
available).
@beep "bl" termcap entry, else "^G" (beep
the terminal); limited to once per
message.
@l or @left left aligned
@c or @center center aligned
@r or @right right aligned
Other @-commands are silently ignored.
X Displays one window per string output to the port. The
output is formatted according to @ commands embedded in
the string. Supported @ commands are:
@roman turns off @italic and @bold
@b or @bold turns on boldface
@i or @italic turns on italics
@l or @left left aligned
@c or @center center aligned
@r or @right right aligned
@large large type size
@medium medium type size
@small small type size
@beep Ring the X bell (limited to once
MIT Project Athena November 30, 1989 9
ZWGC User Commands ZWGC
per message)
@font sets the current font to the font
specified in the contents of the
environment (e.g. @font(fixed)).
This will remain in effect for the
rest of the environment (a tem-
porary change can be achieved by
enclosing the font-change in an
@(...) environment). If the named
font is not available, the font
``fixed'' is used instead.
@color sets the color to the color speci-
fied in the contents of the
environment. The color name should
appear in the X color name data-
base. This color will remain in
effect for the rest of the environ-
ment. If the named color is not
available, the default foreground
color is used.
Any other environment name not corresponding to the
above environment names will set the current ``sub-
style.''
The attributes of a given block of text are determined
by any active environments, evaluated in the context of
the current style and substyle.
The style is specific to each window. Its name has
three dot (``.'') separated fields, which are by
default the values of the class, instance, and reci-
pient variables, with all dots changed to underscores
(``_'') and all letters converted to lowercase. The
style can be altered by setting the _s_t_y_l_e variable.
Note that it mmuusstt aallwwaayyss have exactly two ``.'' charac-
ters in it.
The substyle is determined by @ commands in the message
text.
Zwgc variables which the X output device reads are:
default_X_geometry
default geometry for notices, set
from resources
X_geometry overrides geometry in resource
file, if set
default_X_background
default background color for
notices, set from resources
MIT Project Athena November 30, 1989 10
ZWGC User Commands ZWGC
X_background overrides bgcolor in resource file,
if set
style style, as described above
The expected geometry values are described below.
The fonts and color for a piece of text are determined
by the styles defined in the X resources file. The
following resources relating to text style are used by
zwgc:
zwgc.style._s_t_y_l_e_n_a_m_e_s.geometry
geometry for messages of the specified
style
zwgc.style._s_t_y_l_e_n_a_m_e_s.background
background color for messages of the
specified style
zwgc.style._s_t_y_l_e_n_a_m_e_s.substyle._s_u_b_s_t_y_l_e_n_a_m_e.fontfamily
fontfamily name for the specified style
and substyle
zwgc.style._s_t_y_l_e_n_a_m_e_s.substyle._s_u_b_s_t_y_l_e_n_a_m_e.foreground
foreground color for the specified style
and substyle
zwgc.fontfamily._f_o_n_t_f_a_m_i_l_y_n_a_m_e._s_i_z_e._f_a_c_e
specifies the fonts for a given fontfam-
ily. _s_i_z_e is one of small, medium, or
large, and _f_a_c_e is one of roman, bold,
italic, or bolditalic.
The best way to get started in customizing X resources
for _z_w_g_c is to examine the default application
resources and other users' resources to understand how
they specify the default appearance.
XX RREESSOOUURRCCEESS
Other X resources used by _z_w_g_c are listed below. Entries
like
zwgc*option: value
Zwgc*option: value
zwgc.option: value
*option: value
will work.
An entry labeled with zwgc*option in any of the sources
takes precedence over Zwgc*option, which takes precedence
MIT Project Athena November 30, 1989 11
ZWGC User Commands ZWGC
over *option entries. The following sources are searched in
order:
command-line arguments (-xrm)
contents of file named by XENVIRONMENT environment variable
X server resource database (see _x_r_d_b(1))
application resources file
Logical values can be ( Yes On True T ) or ( No Off False
nil ).
OOPPTTIIOONN:: MMEEAANNIINNGG [[ddeeffaauulltt]]::
cursorCode number of a code from the cursorfont (should
be an even integer, see <_X_1_1/_c_u_r_s_o_r_f_o_n_t._h>)
to use for the windows.
foreground Primary foreground color
Foreground Secondary foreground color (if foreground not
set) [BlackPixel is the default if neither is
set]
background Primary background color
Background Secondary background color (if background not
set) [WhitePixel is the default if neither is
set]
borderColor Primary border color
BorderColor Secondary border color (if borderColor not
set) [BlackPixel is the default if neither is
set]
pointerColor Primary mouse pointer color [foreground color
is the default if not set]
reverseVideo (logical) Toggles foreground and background
(and border, if it matches foreground or
background).
ReverseVideo Secondary toggle, if reverseVideo is not set.
[off is the default if neither is set]
borderWidth Primary border width selector
BorderWidth Secondary border width selector (if bor-
derWidth is not set) [1 is the default value
if neither is set]
internalBorder Primary border between edge and text
MIT Project Athena November 30, 1989 12
ZWGC User Commands ZWGC
InternalBorder Secondary selector (if internalBorder not
set) [2 is the default value if neither is
set]
geometry Primary POSITION (not size) geometry specif-
ier. The geometry should be of the form
"{+|-}x{+|-}y", specifying an (x,y) coordi-
nate for a corner of the window displaying
the notice. The interpretation of positive
and negative location specifications follows
the X conventions. A special location of `c'
for either x or y indicates that the window
should be centered along that axis. Example:
a geometry of "+0+c" specifies the window
should be at the top of the screen, centered
horizontally.
Geometry Secondary position specifer. [+0+0 is the
default if neither is set.]
resetSaver (logical) Primary value to force screen to
unsave when a message first appears.
ResetSaver (logical) Secondary value to force screen to
unsave. [default True]
reverseStack (logical) Primary value to specify that zwgc
should attempt to stack WindowGram windows
such that the oldest messages normally show
on top. Some X window managers may silently
ignore _z_w_g_c's attempts to restack its win-
dows. This option can cause some unusual
interactions with other windows if the user
manually restacks either the other windows or
the WindowGram windows.
ReverseStack Secondary value to enable reverse stacking.
[default False]
title (string) Primary window title
Title Secondary window title [defaults to the last
pathname component of the program name, usu-
ally "zwgc"]
transient (logical) Primary value which determines if
zephyrgram windows will be created with the
WWMM__TTRRAANNSSIIEENNTT__FFOORR property set. If this
resource is true, the property will be set,
telling certain windowmanagers to treat
zephyrgram windows specially. For instance,
_t_w_m will not put decorations on transient
MIT Project Athena November 30, 1989 13
ZWGC User Commands ZWGC
windows, _m_w_m will not let you iconify them,
and _u_w_m ignores the resource entirely.
Transient Secondary transient determining value
[default False]
minTimeToLive Primary value which specifies the minimum
amount of time (``minimum time to live'') a
WindowGram must be on-screen (in mil-
liseconds) until it can be destroyed. This
feature is useful to avoid accidentally
clicking on new WindowGrams when trying to
delete old ones.
MinTimeToLive Secondary value of ``minimum time to live.''
iconName (string) Primary icon name
IconName Secondary icon name [defaults to the last
pathname component of the program name, usu-
ally "zwgc"]
name (string) Primary window class name
name Secondary window class name [defaults to the
last pathname component of the program name,
usually "zwgc"]
synchronous (logical) Primary X synchronous mode specif-
ier. On means to put the X library into syn-
chronous mode.
Synchronous Secondary X synchronous mode specifier.
[default is `off']
The window class is always "Zwgc".
XX BBUUTTTTOONNSS
Clicking and releasing any button without the shift key
depressed while the pointer remains inside a WindowGram win-
dow will cause it to disappear. If the pointer leaves the
window while the button is depressed, the window does not
disappear; this provides a way to avoid accidentally losing
messages.
If the control button is held down while clicking on a Win-
dowGram, then that WindowGram and all windowgrams under the
point where the button is released will be erased.
WWAARRNNIINNGG:: If you do this with too many WindowGrams under the
mouse, it is possible for your subscriptions to be lost. If
_z_c_t_l _r_e_t_r_i_e_v_e returns nothing, then issue a _z_c_t_l _l_o_a_d
MIT Project Athena November 30, 1989 14
ZWGC User Commands ZWGC
command to re-subscribe to your default set of subscrip-
tions. If you use znol, then _z_n_o_l -_q & will restore the
subscriptions you need for _z_n_o_l.
Portions of the text of a message may be selected for "past-
ing" into other X applications by using the shift key in
cooperation with the pointer buttons. Holding the Shift key
while depressing Button1 (usually the left button) will set
a marker at the text under the pointer. Dragging the
pointer with Shift-Button1 still depressed extends the
selection from the start point, until the button is
released. The end of the selection may also be indicated by
releasing Button1, holding down the Shift key, and pressing
Button3 (usually the right button) at the desired endpoint
of the selection. The selection will appear with the text
and background colors reversed.
CCOOMMMMAANNDD LLIINNEE
_z_w_g_c is normally invoked from /_u_s_r/_a_t_h_e_n_a/_l_i_b/_i_n_i_t/_l_o_g_i_n,
$_H_O_M_E/._x_s_e_s_s_i_o_n, or /_u_s_r/_a_t_h_e_n_a/_l_i_b/_i_n_i_t/_x_s_e_s_s_i_o_n in the
foreground and with no arguments. When it has successfully
set your location, it will put itself into the background
(unless the -nofork option has been specified). At this
point it is safe to invoke additional zephyr commands, such
as _z_n_o_l(1). (You can also put these commands in the
_i_n_i_t_p_r_o_g_s Zephyr variable; the value of this variable is
passed as the argument to the _s_y_s_t_e_m(3) library call during
initialization.) _z_w_g_c will exit with an exit status of 0 if
it was able to open the X display successfully or 1 if it
couldn't open the display and the Zephyr variable _f_a_l_l_b_a_c_k
was set to ``false''. If _f_a_l_l_b_a_c_k is set to ``true'', _z_w_g_c
will fall back to ``ttymode'' (making the tty driver the
default output device) if it can't open the X display. If
_f_a_l_l_b_a_c_k is not set and the display cannot be opened, _z_w_g_c
prints an explanatory message and exits with a status of 1.
If the -_t_t_y_m_o_d_e option is specified, _z_w_g_c will ignore any X
display and use the terminal as its primary output device.
This flag overrides any setting of the fallback variable.
The -_r_e_e_n_t_e_r option is provided for compatibility with the
previous version of _z_w_g_c.
_z_w_g_c will exit cleanly (unset location and cancel subscrip-
tions) on:
SIGTERM
SIGHUP
XIOError (with a message to stderr)
SIGHUP is what it expects to get upon logout. Also, the
signals SIGINT, SIGQUIT, and SIGTSTP are ignored because
they can be sent inadvertently, and bizarre side-effects can
MIT Project Athena November 30, 1989 15
ZWGC User Commands ZWGC
result. If you want them to be acted on, then run _z_w_g_c
-_n_o_f_o_r_k &
CCOONNTTRROOLL MMEESSSSAAGGEESS
In order to allow some special user controls over the
behavior of _z_w_g_c, certain Zephyr control notices can be sent
directly to _z_w_g_c using the _z_c_t_l(1) program. Currently imple-
mented controls are
wg_read tell _z_w_g_c to re-read the current description
file.
wg_shutdown tell _z_w_g_c to cancel all subscriptions and
stop acting on incoming notices. _z_w_g_c saves
the subscriptions that were in effect at the
time of the shutdown so that it can restore
them later if needed.
wg_startup tell _z_w_g_c to restart from being shutdown and
reinstall the saved subscriptions.
Other control messages may be implemented in the future.
EEXXAAMMPPLLEESS
For an example of a description file, see
/_u_s_r/_a_t_h_e_n_a/_l_i_b/_z_e_p_h_y_r/_z_w_g_c._d_e_s_c. For an example of X
resources, see /_u_s_r/_a_t_h_e_n_a/_l_i_b/_z_e_p_h_y_r/_z_w_g_c__r_e_s_o_u_r_c_e_s.
BBUUGGSS
The X selection code can highlight the wrong portions of
messages containing formatted text placed with the @center()
or @right() directives.
FFIILLEESS
$HOME/.zwgc.desc
Default location of user's description file
/usr/athena/lib/zephyr/zwgc.desc
System-wide description file
/usr/athena/lib/zephyr/zwgc_resources
Default X application resources.
$HOME/.zephyr.vars
File containing variable definitions
$HOME/.zephyr.subs
Supplementary subscription file
$HOME/.Xresources
Standard X resources file
$WGFILE or /tmp/wg._u_i_d
File used to store WindowGram port number for
MIT Project Athena November 30, 1989 16
ZWGC User Commands ZWGC
other clients
SSEEEE AALLSSOO
csh(1), kinit(1), xrdb(1), zctl(1), zephyr(1), znol(1),
X(1), getenv(3), system(3), termcap(5), zephyrd(8), zhm(8)
Project Athena Technical Plan Section E.4.1, `Zephyr Notifi-
cation Service'
AAUUTTHHOORRSS
John Carr (MIT/Project Athena) <jfc@athena.mit.edu>
Marc Horowitz (MIT/Project Athena) <marc@athena.mit.edu>
Mark Lillibridge (MIT/Project Athena) <mdl@CS.CMU.EDU>
RREESSTTRRIICCTTIIOONNSS
Copyright (c) 1989 by the Massachusetts Institute of Tech-
nology. All Rights Reserved.
_z_e_p_h_y_r(_1) specifies the terms and conditions for redistribu-
tion.
MIT Project Athena November 30, 1989 17